package com.coment.po;

import com.coment.game.user.UserExtends;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.io.Serial;
import java.io.Serializable;

@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString(exclude = {"avatar"})
@EqualsAndHashCode(of = {"apiType", "uId"})
public class UserInfo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    
    @MongoId
    private Integer id;

    private String apiType;

    private String uId;

    private String name;
    private String avatar;
    private Long createTime = System.currentTimeMillis();


    public UserExtends userExtends = new UserExtends();


    /// 最近游玩的房间
    @JsonIgnore
    public int recentlyPlayedAnchorInfoId;

    /// 最近出战的角色
    @JsonIgnore
    public String recentlyPlayedRolesId;

    /// 出战的宠物
    @JsonIgnore
    public String recentlyPlayedPetId;
}
